import { RouteRecordRaw } from 'vue-router'

const userRoutes: Array<RouteRecordRaw> = [
  {
    path: '/user',
    redirect: '/user/list',
    name: 'User',
    meta: { title: '人事管理', icon: 'user' },
    children: [
      {
        path: 'list',
        component: () => import('../views/user/User.vue'),
        name: 'UserList',
        meta: { title: '员工管理', icon: 'user-list' },
      },
      {
        path: 'user',
        component: () => import('../views/user/User.vue'),
        name: 'UserUser',
        meta: { title: '企业员工', icon: 'user-list' },
      },
      {
        path: 'department',
        component: () => import('../views/user/Department.vue'),
        name: 'UserDepartment',
        meta: { title: '部门管理', icon: 'user-department' },
      },
      {
        path: 'position',
        component: () => import('../views/user/Position.vue'),
        name: 'UserPosition',
        meta: { title: '职位管理', icon: 'user-position' },
      },
      {
        path: 'archives',
        component: () => import('../views/user/Archives.vue'),
        name: 'UserArchives',
        meta: { title: '员工档案', icon: 'user-archives' },
      },
      {
        path: 'transfer',
        component: () => import('../views/user/Transfer.vue'),
        name: 'UserTransfer',
        meta: { title: '人事调动', icon: 'user-transfer' },
      },
      {
        path: 'dimission',
        component: () => import('../views/user/Dimission.vue'),
        name: 'UserDimission',
        meta: { title: '离职档案', icon: 'user-dimission' },
      },
      {
        path: 'contract',
        component: () => import('../views/user/Contract.vue'),
        name: 'UserContract',
        meta: { title: '员工合同', icon: 'user-contract' },
      },
      {
        path: 'attendance',
        component: () => import('../views/user/Attendance.vue'),
        name: 'UserAttendance',
        meta: { title: '考勤记录', icon: 'user-attendance' },
      },
      {
        path: 'salary',
        component: () => import('../views/user/Salary.vue'),
        name: 'UserSalary',
        meta: { title: '薪资记录', icon: 'user-salary' },
      },
    ],
  },
]

export default userRoutes
